﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Data;
using System.Web.SessionState;

namespace AjaxLibrary
{
    class buyer_BuyerRange:IHttpHandler,IRequiresSessionState
    {
        #region IHttpHandler 成员

        public bool IsReusable
        {
            get { return true; }
        }

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/phain";
            int companyId = 0;
            companyId = logic.customer.getById(logic.customer.userId).CompanyId;
            bool isSeeccd = false;
            DataTable dt = logic.buyerRange.rootCategorylistWithCompanyRange(companyId);
            isSeeccd = dt.Rows.Count > 0 ? isSeeccd : true;
            context.Response.Output.Write(Convert.ToInt32(isSeeccd));
        }

        #endregion
    }
}
